/*
* Copyright 2024 NXP
* NXP Proprietary. This software is owned or controlled by NXP and may only be used strictly in
* accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing,
* activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to
* comply with and are bound by, such license terms.  If you do not agree to be bound by the applicable license
* terms, then you may not retain, install, activate or otherwise use the software.
*/

#include "lvgl.h"
#include <stdio.h>
#include "gui_guider.h"
#include "events_init.h"
#include "widgets_init.h"
#include "custom.h"



void setup_scr_settings(lv_ui *ui)
{
    //Write codes settings
    ui->settings = lv_obj_create(NULL);
    lv_obj_set_size(ui->settings, 480, 480);
    lv_obj_set_scrollbar_mode(ui->settings, LV_SCROLLBAR_MODE_OFF);

    //Write style for settings, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
    lv_obj_set_style_bg_opa(ui->settings, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

    //Write codes settings_list_settings
    ui->settings_list_settings = lv_list_create(ui->settings);
    ui->settings_list_settings_item0 = lv_list_add_btn(ui->settings_list_settings, LV_SYMBOL_LEFT, "back");
    ui->settings_list_settings_item1 = lv_list_add_btn(ui->settings_list_settings, LV_SYMBOL_WIFI, "wifi");
    ui->settings_list_settings_item2 = lv_list_add_btn(ui->settings_list_settings, LV_SYMBOL_REFRESH, "devices");
    lv_obj_set_pos(ui->settings_list_settings, 0, 0);
    lv_obj_set_size(ui->settings_list_settings, 480, 480);
    lv_obj_set_scrollbar_mode(ui->settings_list_settings, LV_SCROLLBAR_MODE_OFF);

    //Write style state: LV_STATE_DEFAULT for &style_settings_list_settings_main_main_default
    static lv_style_t style_settings_list_settings_main_main_default;
    ui_init_style(&style_settings_list_settings_main_main_default);

    lv_style_set_pad_top(&style_settings_list_settings_main_main_default, 5);
    lv_style_set_pad_left(&style_settings_list_settings_main_main_default, 5);
    lv_style_set_pad_right(&style_settings_list_settings_main_main_default, 5);
    lv_style_set_pad_bottom(&style_settings_list_settings_main_main_default, 5);
    lv_style_set_bg_opa(&style_settings_list_settings_main_main_default, 255);
    lv_style_set_bg_color(&style_settings_list_settings_main_main_default, lv_color_hex(0xffffff));
    lv_style_set_bg_grad_dir(&style_settings_list_settings_main_main_default, LV_GRAD_DIR_NONE);
    lv_style_set_border_width(&style_settings_list_settings_main_main_default, 1);
    lv_style_set_border_opa(&style_settings_list_settings_main_main_default, 255);
    lv_style_set_border_color(&style_settings_list_settings_main_main_default, lv_color_hex(0xe1e6ee));
    lv_style_set_border_side(&style_settings_list_settings_main_main_default, LV_BORDER_SIDE_FULL);
    lv_style_set_radius(&style_settings_list_settings_main_main_default, 3);
    lv_style_set_shadow_width(&style_settings_list_settings_main_main_default, 0);
    lv_obj_add_style(ui->settings_list_settings, &style_settings_list_settings_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);

    //Write style state: LV_STATE_DEFAULT for &style_settings_list_settings_main_scrollbar_default
    static lv_style_t style_settings_list_settings_main_scrollbar_default;
    ui_init_style(&style_settings_list_settings_main_scrollbar_default);

    lv_style_set_radius(&style_settings_list_settings_main_scrollbar_default, 3);
    lv_style_set_bg_opa(&style_settings_list_settings_main_scrollbar_default, 255);
    lv_style_set_bg_color(&style_settings_list_settings_main_scrollbar_default, lv_color_hex(0xffffff));
    lv_style_set_bg_grad_dir(&style_settings_list_settings_main_scrollbar_default, LV_GRAD_DIR_NONE);
    lv_obj_add_style(ui->settings_list_settings, &style_settings_list_settings_main_scrollbar_default, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);

    //Write style state: LV_STATE_DEFAULT for &style_settings_list_settings_extra_btns_main_default
    static lv_style_t style_settings_list_settings_extra_btns_main_default;
    ui_init_style(&style_settings_list_settings_extra_btns_main_default);

    lv_style_set_pad_top(&style_settings_list_settings_extra_btns_main_default, 5);
    lv_style_set_pad_left(&style_settings_list_settings_extra_btns_main_default, 5);
    lv_style_set_pad_right(&style_settings_list_settings_extra_btns_main_default, 5);
    lv_style_set_pad_bottom(&style_settings_list_settings_extra_btns_main_default, 5);
    lv_style_set_border_width(&style_settings_list_settings_extra_btns_main_default, 0);
    lv_style_set_text_color(&style_settings_list_settings_extra_btns_main_default, lv_color_hex(0x0D3055));
    lv_style_set_text_font(&style_settings_list_settings_extra_btns_main_default, &lv_font_montserratMedium_12);
    lv_style_set_text_opa(&style_settings_list_settings_extra_btns_main_default, 255);
    lv_style_set_radius(&style_settings_list_settings_extra_btns_main_default, 3);
    lv_style_set_bg_opa(&style_settings_list_settings_extra_btns_main_default, 255);
    lv_style_set_bg_color(&style_settings_list_settings_extra_btns_main_default, lv_color_hex(0xffffff));
    lv_style_set_bg_grad_dir(&style_settings_list_settings_extra_btns_main_default, LV_GRAD_DIR_NONE);
    lv_obj_add_style(ui->settings_list_settings_item2, &style_settings_list_settings_extra_btns_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_add_style(ui->settings_list_settings_item1, &style_settings_list_settings_extra_btns_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_add_style(ui->settings_list_settings_item0, &style_settings_list_settings_extra_btns_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);

    //Write style state: LV_STATE_DEFAULT for &style_settings_list_settings_extra_texts_main_default
    static lv_style_t style_settings_list_settings_extra_texts_main_default;
    ui_init_style(&style_settings_list_settings_extra_texts_main_default);

    lv_style_set_pad_top(&style_settings_list_settings_extra_texts_main_default, 5);
    lv_style_set_pad_left(&style_settings_list_settings_extra_texts_main_default, 5);
    lv_style_set_pad_right(&style_settings_list_settings_extra_texts_main_default, 5);
    lv_style_set_pad_bottom(&style_settings_list_settings_extra_texts_main_default, 5);
    lv_style_set_border_width(&style_settings_list_settings_extra_texts_main_default, 0);
    lv_style_set_text_color(&style_settings_list_settings_extra_texts_main_default, lv_color_hex(0x0D3055));
    lv_style_set_text_font(&style_settings_list_settings_extra_texts_main_default, &lv_font_montserratMedium_12);
    lv_style_set_text_opa(&style_settings_list_settings_extra_texts_main_default, 255);
    lv_style_set_radius(&style_settings_list_settings_extra_texts_main_default, 3);
    lv_style_set_transform_width(&style_settings_list_settings_extra_texts_main_default, 0);
    lv_style_set_bg_opa(&style_settings_list_settings_extra_texts_main_default, 255);
    lv_style_set_bg_color(&style_settings_list_settings_extra_texts_main_default, lv_color_hex(0xffffff));
    lv_style_set_bg_grad_dir(&style_settings_list_settings_extra_texts_main_default, LV_GRAD_DIR_NONE);

    //The custom code of settings.


    //Update current screen layout.
    lv_obj_update_layout(ui->settings);

    //Init events for screen.
    events_init_settings(ui);
}
